<?php
/**
 * 预立项申请
 */
require_once("../global.inc.php");

class SysProjectDoingClass extends SystemFrameWork{
	/**
	 * 预立项申请对象
	 *
	 * @var obj
	 */
	var $obj_project;
	/*
	 *公司
	 */
	var $obj_company;
	/**
	 * 验证对象
	 *
	 * @var obj
	 */
	var $obj_validate;
	/**
	 * 分页对象
	 *
	 * @var obj
	 */
	var $obj_page;
	
	function main(){
		/**
		 * 创建信息对象
		 */
		if (!is_object($this->obj_company)){
			require_once ("company.class.php");
			$this->obj_company = new CompanyClass();
		}
		/**
		 * 客户公司
		 */
		if (!is_object($this->obj_project)){
			require_once ("project.class.php");
			$this->obj_project = new ProjectClass();
		}
		/**
		 * 创建验证对象
		 */
		if (!is_object($this->obj_validate)){
			require_once("commonvalidate.class.php");
			$this->obj_validate = new CommonValidate();
		}
		/**
		 * 初始化分页类
		 */
		if (!is_object($this->obj_page)){
			require_once("commonpage.class.php");
			$this->obj_page = new CommonPage();
		}
		
		switch($this->_input['action']){
			case "ajax_list":
				$this->_ajax_list();
				break;
			case "mylist":
				$this->_mylist();
				break;
			case "add":
				$this->_add();
				break;
			case "save":
				$this->_save();
				break;
			case "modi":
				$this->_modi();
				break;
			case "update":
				$this->_update();
				break;
			case 'view':
				$this->_view();
				break;
			case "del":
				$this->_del();
				break;
			case "liucheng":
				$this->_liucheng();
				break;
			case "gaojian":
				$this->_gaojian();
				break;
			case "chengyuan":
				$this->_chengyuan();
				break;
			case "huodong":
				$this->_huodong();
				break;
			case "cehua":
				$this->_cehua();
				break;
			case "get_module":
				$this->_get_module();
				break;
			default:
				$this->_list();
		}
	}
	/**
	 * 列表
	 */
	function _list(){
		$this->_ajax_list();
	}
	
	/**
	 * ajax类表
	 */
	function _ajax_list(){

		$this->showpage('sys_project_doing.list');
	}
	/**
	 * 列表
	 */
	function _mylist(){
		$this->showpage('sys_project_doing.mylist');
	}
	
	/**
	 * 信息添加
	 */
	function _add(){
		
		$this->showpage('sys_project_doing.add');
	}
	/**
	 * 信息添加
	 */
	function _save(){
		$this->redirectPath('error','./project.manage.php?action=list','创建预立项申请成功！',1);
			
	}
	
	/**
	 * 修改信息
	 */
	function _modi(){
		$this->showpage('sys_project_doing.modi');
	}
	
	/**
	 * 保存修改
	 */
	function _update(){
		$this->redirectPath('error','./project.manage.php?action=list','更新预立项申请成功！',1);
			
	}
	/**
	 * 查看
	 */
	function _view(){
		
		$this->showpage('sys_project_doing.view');
	}
	/**
	 * 删除信息
	 */
	function _del(){
		$this->redirectPath('error', '' , '删除预立项申请成功！', 1);

	}
	
	function _liucheng(){
		$this->showpage('sys_project_doing.liucheng');
	}
	
	function _gaojian(){
		$this->showpage('sys_project_doing.gaojian');
	}
	
	function _chengyuan(){
		$this->showpage('sys_project_doing.chengyuan');
	}
	
	function _huodong(){
		$this->showpage('sys_project_doing.huodong');
	}
	
	function _cehua(){
		$this->showpage('sys_project_doing.cehua');
	}
	
	/**
	 * 取模块内容
	 */
	function _get_module(){

		$module_name = $this->_input['module_name'];

		switch ($module_name){
			case "selCompany":
				$this->showpage("sys_module_company.info");
				break;
			case 'selCustomer':
				$this->showpage("sys_module_customer.info");
				break;
			case 'selMember':
				$this->showpage("sys_module_member.info");
				break;
			default:
				exit;
		}
	}

}
$project = new SysProjectDoingClass();
$project->main();
unset($project);
?>